package com.boat.ai.domain.entity;

import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import java.time.Instant;

@Entity
@Table(name = "kw_segment")
public class KwSegment extends PanacheEntityBase {

    @Id
    @Column(name = "id", nullable = false)
    public Long id;

    @Column(name = "knowledge_id", nullable = false)
    public Long knowledgeId;

    @Column(name = "document_id", nullable = false)
    public Long documentId;

    @Column(name = "tag", nullable = false)
    public String tag;

    @Column(name = "segment", nullable = false)
    public String segment;

    @CreationTimestamp
    @Column(name = "create_time", nullable = false, updatable = false)
    public Instant createTime;

    @UpdateTimestamp
    @Column(name = "update_time", nullable = false)
    public Instant updateTime;

}